import unittest
import town
import merchant


class TownTest(unittest.TestCase):
    """Test case for the 'town' module"""
    
    def test_merchant(self):
        "test the merchant features"
        t = town.Town()
        
        self.assertEqual(len(t.merchants), 0)
        
        m = merchant.Merchant(None)
        
        t.merchants.add(m)
        
        self.assertEqual(len(t.merchants), 1)
        
        self.assertTrue(m in t.merchants)
        
        t.merchants.remove(m)
       
        self.assertEqual(len(t.merchants), 0)
        
        self.assertFalse(m in t.merchants)
    
        
    


if __name__ == '__main__':
    unittest.main()
    
def get_suite():
    return unittest.makeSuite(TownTest)
